package practicaspl.uno;

public class Back {
	
	private String signature;

	public Back()
	{
		signature = new String();
	}
	
	public String getSignature() {
		return signature;
	}

	public void setSignature(String signature) {
		this.signature = signature;
	}
	
	public void leerBack(String ba)
	{
		int princ = 0;
		int fin = 0;
		String s;
		//buscamos la parte del xml donde tenemos el signature
		princ = ba.indexOf("<signature>");
		fin = ba.indexOf("</signature>");
		s = ba.substring(princ, fin);
		setSignature( s.replace("</signature>", ""));
	}
	
	public String translateBack()
	{
		String bt;
		bt = "<P CLASS=\"signature\"><font color=\"grey\">";
		bt = bt + getSignature();
		bt = bt + "</font></P>\n</BODY>\n</HTML>";
		return (bt);
	}
}
